package com.ec.mn.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ec.mn.entity.HealthRecord;
import com.ec.mn.entity.Notification;

import java.time.LocalDateTime;
import java.util.List;

public interface NotificationService extends IService<Notification> {
    List<Notification> getByReceiverId(Long receiverId);

    List<Notification> getBySenderId(Long senderId);

    List<Notification> getUnreadByReceiverId(Long receiverId);

    List<Notification> getReadByReceiverId(Long receiverId);

    boolean markAsRead(Long id);

    boolean markAsDeleted(Long id);

    Long countUnreadByReceiverId(Long receiverId);

    Long countReadByReceiverId(Long receiverId);

    List<Notification> getByTimeRange(Long receiverId, LocalDateTime startTime, LocalDateTime endTime);

    IPage<Notification> getPageByReceiverId(Page<Notification> page, Long receiverId);

    boolean validateNotification(Notification notification);
    void add(HealthRecord healthRecord,String content );
} 